import request from "@/util/request";

//获取省份接口
export const getAllProvinces = async () => {
  return request.get('/common/getAllProvinces')
}

//获取城市
export const getCitiesByProvinceId = async (id) => {
  return request.get('/common/getCitiesByProvinceId', { params: { id } })
}

//获取所有公司行业
export const getAllCompanyIndustries = async () => {
  return request.get('/common/getAllCompanyIndustries')
}

//根据城市名返回省份
export const getProvinceByCity = async (cityName) => {
  return request.get('/common/getProvinceByCity', { params: { cityName } })
}

//根据职位名称,职位类型返回省份
export const getPositionAllMessageByIndustryAndName = async (industryName, detailName) => {
  return request.get('/common/getPositionAllMessageByIndustryAndName', { params: { industryName, detailName } })
}

//修改手机号
export const resetPhone = (oldPhone, newPhone, password) => {
  return request.post('/recruiter/auth/resetPhone', { oldPhone, newPhone, password })
}

//修改密码
export const resetPassword = (phone, newPassword, oldPassword) => {
  return request.post('/recruiter/auth/resetPassword', { phone, newPassword, oldPassword })
}